{% extends 'base.html' %}

{% block title %}
	EduTech Spur
{% endblock %}

{% block scripts %}
	<script type="text/javascript" src="/static/scripts/home.js"></script>
{% endblock %}

{% block sidebar %}
<!-- 
<div class="sidebar-block spacing">
  <div class="sidebar-block-inner">
    <h4 class="sidebar-block-header">操作</h4>
    <div class="sidebar-block-content">
      <ul class="sidebar-block-list">
	    <li><a href="/entries/new">提交文章</a></li>
      </ul>
    </div>
  </div>
</div>
-->
<div class="sidebar-block spacing">
  <div class="sidebar-block-inner">
  	<h4 class="sidebar-block-header">标签</h4>
    <div class="sidebar-block-content">
      <ul id="tag-cloud" class="sidebar-tag-cloud">
        {% for tag in tags %}
        	<li class="tag{{ tag.weight }}"><a href="/tags/{{ tag.name }}" kn="{{ tag.key_name }}">{{ tag.name }}</a></li>
        {% endfor %}
      </ul>
    </div>
    <div class="sidebar-block-footer">
      <a id="all-tags-link" href="entry/tags/all">所有标签</a>	
    </div>
  </div>
</div>
{% endblock %}

{% block main_content %}
<div id="main-content">
	{% for entry in page.object_list %}
	<div class="entry">
      <div class="entry-title"><a href="/entries/{{ entry.id }}">{{ entry.title }}</a></div>
      <div class="entry-info">
      	{% if entry.author %} 作者：{{ entry.author }} {% endif %} &nbsp;&nbsp;&nbsp;&nbsp;
      	发表时间： {{ entry.local_put_time }}
      </div>
      <div class="entry-content">
      	 {{ entry.text }}<!--  <a href="/entries/{{ entry.id }}">查看全文</a>  -->
      </div>
      <div class="entry-footer">
        <div class="entry-tags">
          <span>标签：{% for tag in entry.entry_tags %} {{ tag.name }} &nbsp;&nbsp; {% endfor %}</span>
        </div>
        <div class="entry-actions">
          <!-- 
          <span>发回邮箱</span>&nbsp;&nbsp;
          <span>发给好友</span>
           -->
        </div>
        <div class="clear"></div>
      </div>
      <div class="clear"></div>
    </div>
	{% endfor %}
	<ul id="pagination">
	    {% if page.has_previous%}
	    	<li class="previous-off"><a href="#">前一页</a></li>
	    {% endif %}
	    {% if page.has_next %}
	        <li class="next"><a href="#">后一页</a></li>
	    {% endif %}
	</ul>
</div>
{% endblock %}